﻿using System;
using System.Collections.Generic;
using JTLeigh.Commerce.Spencer.Features.ProductFeedback.Common.Entities;
using ProductFeedbackE = JTLeigh.Commerce.Spencer.Features.ProductFeedback.Common.Entities.ProductFeedback;

namespace JTLeigh.Commerce.Spencer.Features.ProductFeedback.Business.Services
{

	/// <summary>
	/// Service used to retrieve product feedback metadata, including rating attributes, 
	/// recommendation attributes, and review attributes.
	/// </summary>
	public interface IProductFeedbackMetadataService
	{

		#region Methods

        /// <summary>
        /// Gets the product feedback badges that are relevant to the specified feedback.
        /// </summary>
        /// <param name="tenantId">The tenant identifier <see cref="Guid"/> of the tenant whose
        /// badges are to be retrieved.</param>
        /// <param name="catalogId">The catalog identifier <see cref="String"/> of the catalog
        /// containing the product whose badges are to be retrieved.</param>
        /// <param name="productId">The product identifier <see cref="String"/> of the product 
        /// whose badges are to be retrieved.</param>
        /// <param name="effectiveDate">The date to use as the current date when deciding whether 
        /// to include a badge association or disassociation.</param>
        /// <param name="feedback">The <see cref="IList{T}"/> of the <see cref="ProductFeedbackE"/>
        /// whose badges are to be retrieved.</param>
        /// <returns>A <see cref="Dictionary{TKey,TValue}"/> of <see cref="ProductFeedbackBadge"/>
        /// keyed by badge identifier <see cref="Guid"/>.</returns>
        Dictionary<Guid, ProductFeedbackBadge> GetProductFeedbackBadges(Guid tenantId, string catalogId, string productId, DateTime effectiveDate, IList<ProductFeedbackE> feedback);

		/// <summary>
		/// Gets the product rating attributes that are relevant to the specified product and
		/// feedback, localized for the specified culture, as of the specified effective date.
		/// </summary>
		/// <param name="tenantId">The tenant identifier <see cref="Guid"/> of the tenant whose
		/// attributes are to be retrieved.</param>
        /// <param name="catalogId">The catalog identifier <see cref="String"/> of the catalog
        /// containing the product whose attributes are to be retrieved.</param>
        /// <param name="productId">The product identifier <see cref="String"/> of the product 
		/// whose attributes are to be retrieved.</param>
		/// <param name="cultureId">The <see cref="Int32"/> LCID of the culture to use to retrieve
		/// culture-specific resources.</param>
		/// <param name="effectiveDate">The date to use as the current date when deciding whether 
		/// to include an attribute association or disassociation.</param>
        /// <param name="feedback">The <see cref="IList{T}"/> of the <see cref="ProductFeedbackE"/>
		/// whose attributes are to be retrieved.</param>
		/// <returns>A <see cref="Dictionary{TKey,TValue}"/> of <see cref="LocalizedProductRatingAttribute"/>
		/// keyed by attribute identifier <see cref="Guid"/>.</returns>
		Dictionary<Guid, LocalizedProductRatingAttribute> GetProductRatingAttributes(Guid tenantId, string catalogId, string productId, int cultureId, DateTime effectiveDate, IList<ProductFeedbackE> feedback);

		/// <summary>
		/// Gets the product recommendation attributes that are relevant to the specified product 
		/// and feedback, localized for the specified culture, as of the specified effective date.
		/// </summary>
		/// <param name="tenantId">The tenant identifier <see cref="Guid"/> of the tenant whose
		/// attributes are to be retrieved.</param>
        /// <param name="catalogId">The catalog identifier <see cref="String"/> of the catalog
        /// containing the product whose attributes are to be retrieved.</param>
        /// <param name="productId">The product identifier <see cref="String"/> of the product 
		/// whose attributes are to be retrieved.</param>
		/// <param name="cultureId">The <see cref="Int32"/> LCID of the culture to use to retrieve
		/// culture-specific resources.</param>
		/// <param name="effectiveDate">The date to use as the current date when deciding whether 
		/// to include an attribute association or disassociation.</param>
		/// <param name="feedback">The <see cref="IList{T}"/> of the <see cref="ProductFeedbackE"/>
		/// whose attributes are to be retrieved.</param>
		/// <returns>A <see cref="Dictionary{TKey,TValue}"/> of <see cref="LocalizedProductRecommendationAttribute"/>
		/// keyed by attribute identifier <see cref="Guid"/>.</returns>
		Dictionary<Guid, LocalizedProductRecommendationAttribute> GetProductRecommendationAttributes(Guid tenantId, string catalogId, string productId, int cultureId, DateTime effectiveDate, IList<ProductFeedbackE> feedback);

		/// <summary>
		/// Gets the product review attributes that are relevant to the specified product and
		/// feedback, localized for the specified culture, as of the specified effective date.
		/// </summary>
		/// <param name="tenantId">The tenant identifier <see cref="Guid"/> of the tenant whose
		/// attributes are to be retrieved.</param>
        /// <param name="catalogId">The catalog identifier <see cref="String"/> of the catalog
        /// containing the product whose attributes are to be retrieved.</param>
        /// <param name="productId">The product identifier <see cref="String"/> of the product 
		/// whose attributes are to be retrieved.</param>
		/// <param name="cultureId">The <see cref="Int32"/> LCID of the culture to use to retrieve
		/// culture-specific resources.</param>
		/// <param name="effectiveDate">The date to use as the current date when deciding whether 
		/// to include an attribute association or disassociation.</param>
		/// <param name="feedback">The <see cref="IList{T}"/> of the <see cref="ProductFeedbackE"/>
		/// whose attributes are to be retrieved.</param>
		/// <returns>A <see cref="Dictionary{TKey,TValue}"/> of <see cref="LocalizedProductReviewAttribute"/>
		/// keyed by attribute identifier <see cref="Guid"/>.</returns>
		Dictionary<Guid, LocalizedProductReviewAttribute> GetProductReviewAttributes(Guid tenantId, string catalogId, string productId, int cultureId, DateTime effectiveDate, IList<ProductFeedbackE> feedback);

		#endregion // Methods

	}

}
